home *** CD-ROM | disk | FTP | other *** search
/ Shareware Gold 2 / Shareware Gold II - Volume 2 Number 1 - Wayzata Technology (7071) (1991).iso / business / flowdraw / copylib.bat next >
DOS Batch File  |  1989-11-11  |  3KB  |  96 lines

  1. @ECHO OFF
  2. GOTO EDIT
  3. REM
  4. REM ***************
  5. REM * COPYLIB.BAT *
  6. REM ***************
  7. REM
  8. REM This batch file creates a new library or adds libraries to an existing
  9. REM    library.
  10. REM The format for using this batch file is COPYLIB LIBNAME LIBRARY1 LIBRARY2...
  11. REM     where LIBNAME is the name of the library without the .LIB extension
  12. REM    and LIBRARY1 LIBRARY2... are the names of up to 8 library files without
  13. REM    the .LIB extension
  14. REM Example:
  15. REM COPYLIB BIGLIB FLOCHART MISC HIPO
  16. REM    This command would create a library called BIGLIB.LIB which would
  17. REM    contain the libraries FLOCHART.LIB, MISC.LIB, and HIPO.LIB.  If the
  18. REM    library BIGLIB already exists, this command would add the other
  19. REM    libraries to BIGLIB.
  20. REM
  21. :EDIT
  22. IF %1.LIB==.LIB GOTO ERROR1
  23. IF %2.LIB==.LIB GOTO ERROR1
  24. IF NOT EXIST %2.LIB GOTO ERROR2
  25. ECHO Starting library maintenance for %1.LIB
  26. IF EXIST %1.LIB GOTO HAVELIB
  27. ECHO We are creating a new library called %1.LIB
  28. ECHO We will start the library with the following library files:
  29. GOTO LIBRARY1
  30. :HAVELIB
  31. ECHO We will add the following library files to the library %1.LIB
  32. :LIBRARY1
  33. ECHO %2.LIB
  34. :LIBRARY2
  35. IF NOT EXIST %3.LIB ECHO *** %3.LIB not found ***
  36. IF NOT EXIST %3.LIB GOTO LIBRARY3
  37. ECHO %3.LIB
  38. :LIBRARY3
  39. IF NOT EXIST %4.LIB ECHO *** %4.LIB not found ***
  40. IF NOT EXIST %4.LIB GOTO LIBRARY4
  41. ECHO %4.LIB
  42. :LIBRARY4
  43. IF NOT EXIST %5.LIB ECHO *** %5.LIB not found ***
  44. IF NOT EXIST %5.LIB GOTO LIBRARY5
  45. ECHO %5.LIB
  46. :LIBRARY5
  47. IF NOT EXIST %6.LIB ECHO *** %6.LIB not found ***
  48. IF NOT EXIST %6.LIB GOTO LIBRARY6
  49. ECHO %6.LIB
  50. :LIBRARY6
  51. IF NOT EXIST %7.LIB ECHO *** %7.LIB not found ***
  52. IF NOT EXIST %7.LIB GOTO LIBRARY7
  53. ECHO %7.LIB
  54. :LIBRARY7
  55. IF NOT EXIST %8.LIB ECHO *** %8.LIB not found ***
  56. IF NOT EXIST %8.LIB GOTO LIBRARY8
  57. ECHO %8.LIB
  58. :LIBRARY8
  59. IF NOT EXIST %9.LIB ECHO *** %9.LIB not found ***
  60. IF NOT EXIST %9.LIB GOTO ENDSYMS
  61. ECHO %9.LIB
  62. :ENDSYMS
  63. @ECHO ON
  64. PAUSE Is this correct? Press any key to continue, Ctrl-Break to quit.
  65. @ECHO OFF
  66. ECHO We are adding libraries to library %1.LIB
  67. IF EXIST %1.LIB GOTO OLDLIB
  68. COPY %2.LIB/B+%3.LIB+%4.LIB+%5.LIB+%6.LIB+%7.LIB+%8.LIB+%9.LIB %1.LIB/B
  69. GOTO END
  70. :OLDLIB
  71. COPY %1.LIB/B+%2.LIB+%3.LIB+%4.LIB+%5.LIB+%6.LIB+%7.LIB+%8.LIB+%9.LIB
  72. GOTO END
  73. :ERROR1
  74. ECHO We cannot process your COPYLIB command.
  75. ECHO You may be using COPYLIB with the incorrect format.
  76. ECHO The correct format for using COPYLIB is -
  77. ECHO   +--------------------------------------------------------+
  78. ECHO   : COPYLIB library-name library-name-1 library-name-2 ... :
  79. ECHO   +--------------------------------------------------------+
  80. ECHO where 
  81. ECHO     library-name is the file name of the library without the
  82. ECHO     .LIB extension 
  83. ECHO and
  84. ECHO     library-name-1 library-name-2 ...
  85. ECHO     are 1 to 8 file names for library files without the .LIB extension.
  86. GOTO FINI
  87. :ERROR2
  88. ECHO We cannot process your COPYLIB command.
  89. ECHO The 1st library file %2.LIB cannot be found.
  90. ECHO Please check the directory for the correct file name.
  91. GOTO FINI
  92. :END
  93. ECHO Library maintenance completed for library %1.LIB
  94. :FINI
  95. 
  96.